import Vue from 'vue'
import 'normalize.css/normalize.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN'
import '@/styles/index.scss'
// 清空表单
import resetForm from '@/utils/resetForm'
Vue.prototype.$resetForm = resetForm
// 信息提示框
import myconfirm from '@/utils/myconfirm'
Vue.prototype.$myconfirm = myconfirm
// 对象快速复制
import objCoppy from '@/utils/objCoppy'
Vue.prototype.$objCoppy = objCoppy

// 按钮权限判断
import hasPermission from '@/permission/index'
Vue.prototype.hasPerm = hasPermission

import App from './App'
import store from './store'
import router from './router'

import '@/icons'
import '@/permission'
import '@/assets/icons/iconfont.css'
if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('../mock')
  mockXHR()
}

Vue.use(ElementUI, { locale })

Vue.config.productionTip = false
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
